package com.i2works.smartluolong.web.dal.user.dao;


import com.i2works.smartluolong.utils.basecommon.BaseCommonDAO;
import com.i2works.smartluolong.utils.exception.DAOException;
import com.i2works.smartluolong.web.entity.user.UserResDO;
import com.i2works.smartluolong.web.entity.user.UserResQuery;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * 会员资源DAO接口
 *
 * @author Liu Yutao
 * @className UserResController
 * @email koal@vip.qq.com
 * @date 2016/2/26 14:30
 */
@Repository("userResDAO")
public interface IUserResDAO extends BaseCommonDAO<UserResQuery,UserResDO> {

    /**
     * 根据资源树
     */
    List<UserResDO> queryTreeList(UserResQuery query) throws DAOException;

    /**
     * 查询资源列表(全部，不分页，不关联账号，系统会员专用)
     */
    List<UserResDO> queryAllList(UserResQuery query) throws DAOException;

    /**
     * 查询某会员的所有资源
     */
    Set<UserResDO> queryUserResList(UserResQuery query) throws DAOException;

    /**
     * 返回某人所拥有的资源ID
     */
    UserResDO queryHasChecked(UserResQuery query) throws DAOException;

    /**
     * 删除角色资源关系表
     */
    void deleteRoleRes(Integer ResId) throws DAOException;

    /**
     * 删除角色资源关系表
     */
    void deleteBatchRoleRes(List<Integer> idsList) throws DAOException;


}
